package com.spudtech.tween
{
    
    import flash.geom.*;
    import flash.display.*;
    
    import com.spudtech.*;
    
    
    public class SpudPositionTween extends SpudTween
    {
        
        public var startPos : Point;
        public var endPos : Point;
        
        
        public function SpudPositionTween(start_pos : Point,
                                          end_pos : Point,
                                          step_count : uint,
                                          play_mode : uint = PLAY_ONCE,
                                          init_easer : Function = null,
                                          init_callback : Function = null)
        {
            super(step_count, play_mode, init_easer, init_callback);
            
            startPos = start_pos.clone();
            endPos = end_pos.clone();
            
        }
        
        
        public function get currentPos() : Point
        {
            return SpudRoot.lerpPoint(startPos, endPos, step, stepCount);
        }
        
        
        override public function update() : void
        {
            super.update();
            
        }
        
    }
    
}
